<%@page pageEncoding="UTF-8"%>
<%@page trimDirectiveWhitespaces="true" %>
<%@taglib prefix="commonTag" 	tagdir="/WEB-INF/tags/common/html"%>
<%@taglib prefix="prototypeUI"	tagdir="/WEB-INF/tags/common/Prototype"%>
<%@taglib prefix="UI"	tagdir="/WEB-INF/tags/common/UI"%>
<%
	// 设置模块名称
	request.setAttribute("moduleName", "公司相册"); 
	request.setAttribute("parentModuleName", "网站属性管理"); 
%>
<!DOCTYPE html>
<html>
	<commonTag:head lessFile="/admin/asset/less/main.less">
		<%@ include file="../public/head.jsp" %>
	</commonTag:head>
    <body class="companyAlbum">
		<prototypeUI:nav />
		<UI:public load="lightbox" />
        <div class="tabContainer tab2">
<!--         	<button class="uploadBtn btn btn-primary ui-wizard-content ui-formwizard-button">上传图片</button> -->
			<ul>
				<li class="selected" style="margin-left: 125px;">产品中心</li>
                <li>工程案例</li>
			</ul>
			<div class="content">
				<div class="tab img1 phtoList">
                    <ul class="photoList">
                        <li>
                           
                        </li>
                    </ul>
				</div>
				<div class="tab img2" style="display:none;">
                    <ul class="photoList">
                        <li>
                           
                        </li>
                    </ul>
				</div>
			</div> 
		</div>

		<script>
			seajs.use(['bigfoot/common', 'bigfoot/widget/tab/tab', 'bigfoot/widget/carousel/main'], 
					function($, _tab, _carousel){
			    // Create tab object  
				var tabContainer = document.querySelector('.tabContainer'), 
					tab = Object.create(_tab.tabs);
			    
			    tab.init(tabContainer);
			    
				var tpl = 
			    	'<tpl>\
				    	<li>\
				            <img src="../../img/{filename}" />\
				        </li>\
			    	</tpl>';
	
				$.get('../../service/news/img', function(json){
					json.result && json.result.length && $.databinding_List(
						tpl, json.result, document.querySelector('.img1 ul')
					);
				});
				
			 	$.get('../../service/projectcase/img', function(json){
					json.result && json.result.length && $.databinding_List(
						tpl, json.result, document.querySelector('.img2 ul')
					);
				});
			 	
			    tabContainer.onClk(_carousel.showLightBox);
			});
		</script> 
	</body>
</html>